import { createRequest } from '@/request'

// 返回总参与人数、正在学习中人数和已完成人数
export const studentCountStatistics = learningId => {
  return createRequest({
    url: `/teacher/learningTask/studentCountStatistics/${learningId}`,
    method: 'get',
  })
}

// 完成率的分布统计
export const completionRateDistribution = learningId => {
  return createRequest({
    url: `/teacher/learningTask/completionRateDistribution/${learningId}`,
    method: 'get',
  })
}

// 查询总记录数
export const learningTaskCount = () => {
  return createRequest({
    url: `/teacher/learningTask/count`,
    method: 'get',
  })
}

// 根据id查询详情
export const learningTaskFindById = id => {
  return createRequest({
    url: `/teacher/learningTask/findById/${id}`,
    method: 'get',
  })
}
// 分页查询
export const learningTaskCompletionRateStudent = data => {
  return createRequest({
    url: `/teacher/learningTask/completionRateStudent/${data.id}`,
    method: 'get',
    params: data
  })
}

